package org.ayachinene.leetcode.problems;

public class P2309 {
    static class Solution {

        public String greatestLetter(String s) {
            boolean[] occur = new boolean[256];
            s.chars().forEach(c -> occur[c] = true);
            for (char i = 'Z'; i >= 'A'; --i) {
                if (occur[i] && occur[i + 32]) {
                    return String.valueOf(i);
                }
            }
            return "";
        }
    }
}
